package com.jtny.nytb.datafilling.service;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.jtny.component.entity.PageData;
import com.jtny.component.entity.PageParam;
import com.jtny.component.exception.ServiceException;
import com.jtny.nytb.datafilling.dto.DatafillingUserelectircFillDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

public interface DatafillingUserElectircService {

    @ApiOperation("新增用户用电信息")
    @ApiImplicitParam(name = "datafillingUserelectircFillDTO", value = "用户用电信息对象", required = true, paramType = "query")
    @ApiOperationSupport(order = 2)
    @PostMapping("/addUserElectricInfo")
    @ResponseBody
    Boolean addUserElectricInfo(@RequestBody DatafillingUserelectircFillDTO datafillingUserelectircFillDTO);

    @ApiOperation("保存用户用电信息")
    @ApiImplicitParam(name = "datafillingUserelectircFillDTO", value = "用户用电信息对象", required = true, paramType = "query")
    @ApiOperationSupport(order = 2)
    @PostMapping("/saveUserElectricInfo")
    @ResponseBody
    Boolean saveUserElectricInfo(@RequestBody DatafillingUserelectircFillDTO datafillingUserelectircFillDTO);

    @ApiOperation("查询所有用户用电信息数据")
    @ApiOperationSupport(order = 3)
    @PostMapping("/queryPageUserElectricInfo")
    @ResponseBody
    PageData<DatafillingUserelectircFillDTO> queryPage(@RequestBody PageParam pageParam) throws ServiceException;

    @ApiOperation("查询额外功率因数等级")
    @ApiOperationSupport(order = 4)
    @GetMapping("/queryPowerFactor")
    @ResponseBody
    List<String> queryPowerFactor() throws ServiceException;
}
